<?php
if ($query->num_rows() > 0) {
    $aRow = $query->row();
    $image_path = './assets/actuimg/thumbs/' . $aRow->img;
    if (file_exists($image_path)) {
        $image_path = base_url() . 'assets/actuimg/thumbs/' . $aRow->img;
    } else {
        $image_path = base_url() . 'assets/noimage.gif';
    }
}
?>

<div id="wrapper-content">    
    <?php echo form_open_multipart('actualite/update_news/' . $aRow->id . '/' . $per_page . '/' . $off_set); ?>
  <table class="titrepage" width="100%">
        <tr>
            <td >Modifier actualités</td>
            <td align="right"> </td>
        </tr>
    </table>
     
        <table class="list" cellpadding="10px" cellspacing="0" width="100%">
            <tr>
                <td><label for="fr_title">Titre</label></td>
                <td><input type="text" size="50" name="txtFrTitle" value="<?php echo $aRow->title; ?>"><?php echo form_error('txtFrTitle'); ?></td>
            </tr>
            <tr>
                <td>Image:</td>
                <td><img border="0" width="100px" src="<?php echo $image_path; ?>"/><input type="file" name="userfile" size="20"></td>
            </tr>
            <tr>
                <td valign="top"><a href="#">Intro</a></td>
                <td colspan="2">
                    <?php
                    $data = array('name' => 'intro',
                        'id' => 'txtDes',
                        'width' => '610',
                        'height' => '250',
                        'value' => $aRow->introtext
                    );
                    echo form_fckeditor($data);
                    ?>
                </td>
            </tr>
            <tr>
                <td valign="top"><a href="#" id="frDesLink">Contenu</a></td>
                <td colspan="2">
                    <?php
                    $data = array('name' => 'txtFrDes',
                        'id' => 'txtDes',
                        'width' => '610',
                        'height' => '400',
                        'value' => $aRow->content
                        );
                    echo form_fckeditor($data);
                    ?>
                </td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" name="submit" value="Enregistrer"/></td>
            </tr>

        </table>
        <?php echo form_close(); ?>

</div>